* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s ease-out;
}

.loading-content {
    text-align: center;
    max-width: 80%;
}

.loading-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.2rem;
    color: #4da6ff;
    text-shadow: 0 0 15px rgba(0, 150, 255, 0.8);
}

.loading-content h2 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: #99ccff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

.loading-bar-container {
    width: 100%;
    max-width: 400px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto 15px;
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.5), 
                inset 0 0 5px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #ff0080, #00ffff);
    transition: width 0.3s ease-out;
}

#loadingText {
    color: #99ccff;
    font-size: 1rem;
}

/* Existing styles continue... */
.universe-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#universeCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: default;
}

#universeCanvas.clickable {
    cursor: pointer;
}

.ui-container {
    position: relative;
    z-index: 2;
    pointer-events: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.title {
    text-align: center;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(0, 0, 255, 0.7);
}

.title h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #4da6ff;
}

.title p {
    color: #99ccff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.interaction-tip {
    color: #ff9900;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.scale-slider {
    position: relative;
    width: 80%;
    margin: 0 auto 40px auto;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    display: flex;
    align-items: center;
    pointer-events: auto;
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.scale-marker {
    font-size: 0.8rem;
    color: #99ccff;
    width: 60px;
    text-align: center;
}

#scaleSlider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff0080, #00ffff);
    outline: none;
    border-radius: 3px;
    margin: 0 10px;
}

#scaleSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

#scaleSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    max-width: 300px;
    pointer-events: auto;
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);
    border: 1px solid rgba(0, 150, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

.info-panel.selected {
    box-shadow: 0 0 20px rgba(255, 153, 0, 0.5);
    border: 1px solid rgba(255, 153, 0, 0.5);
}

#objectName {
    margin-bottom: 10px;
    color: #4da6ff;
}

#objectDescription {
    margin-bottom: 10px;
    line-height: 1.3;
}

#objectScale {
    font-weight: bold;
    color: #00ffcc;
}

.controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    pointer-events: auto;
}

.control-button {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    outline: none;
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.3);
    transition: all 0.3s ease;
}

.control-button:hover {
    background-color: rgba(0, 20, 40, 0.9);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
}

.control-button:active {
    transform: scale(0.95);
}

/* Loading screen responsive styles */
@media (max-width: 768px) {
    .loading-content h1 {
        font-size: 2rem;
    }
    
    .loading-content h2 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .loading-bar-container {
        max-width: 280px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .loading-content h1 {
        font-size: 1.6rem;
    }
    
    .loading-content h2 {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .loading-bar-container {
        max-width: 220px;
    }
    
    #loadingText {
        font-size: 0.9rem;
    }
}

/* Enhanced mobile styles */
@media (max-width: 768px) {
    .title h1 {
        font-size: 1.6rem;
    }
    
    .title p {
        font-size: 0.9rem;
    }
    
    .info-panel {
        max-width: 250px;
        top: 10px;
        right: 10px;
        font-size: 0.9rem;
    }
    
    #objectName {
        font-size: 1.2rem;
    }
    
    .scale-slider {
        width: 95%;
        padding: 12px 10px;
        margin-bottom: 20px;
    }
    
    #scaleSlider {
        height: 8px; 
    }
    
    #scaleSlider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    #scaleSlider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
    
    .scale-marker {
        font-size: 0.7rem;
        width: 50px;
    }
    
    .controls {
        top: 10px;
        left: 10px;
    }
    
    .control-button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .title h1 {
        font-size: 1.4rem;
    }
    
    .title p {
        font-size: 0.8rem;
    }
    
    .info-panel {
        max-width: 220px;
        padding: 10px;
        top: 5px;
        right: 5px;
    }
    
    #objectName {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    #objectDescription, #objectScale {
        font-size: 0.85rem;
    }
    
    .scale-slider {
        padding: 10px 8px;
        margin-bottom: 15px;
    }
}

/* Portrait orientation specific adjustments */
@media (max-width: 768px) and (orientation: portrait) {
    .ui-container {
        padding: 10px;
    }
    
    .title {
        margin-top: 10px;
    }
    
    .scale-slider {
        margin-bottom: 15px;
    }
}

/* Landscape orientation specific adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .title {
        margin-top: 5px;
    }
    
    .title h1 {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }
    
    .title p {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }
    
    .scale-slider {
        margin: 5px auto 10px auto;
        padding: 8px;
    }
    
    .info-panel {
        top: 5px;
        max-height: 80vh;
        overflow-y: auto;
    }
}